package com.mccken.demo.proxy.jdk.jdk1;

/**
 * @program: mccken-collect
 * @description:
 * @author: mccken
 * @create: 2023-01-03 13:59
 **/
public class Client {
	public static void main(String[] args) throws Throwable {
		UserService userService = new UserServiceImpl();
		ServiceInvocationHandler handler = new ServiceInvocationHandler(userService);

		// 根据目标生成代理对象
		UserService proxy = (UserService) handler.getProxy();
		proxy.addUser();
	}
}
